extends NodeState

@export var player: Player


func _on_process(_delta : float) -> void:
	pass


func _on_physics_process(_delta : float) -> void:
	pass



func _on_enter() -> void:
	# 进入时不允许再接收伤害
	player.damageReceiver.set_deferred("monitorable", false)

	player.animationPlayer.play(Player.ANIMATION_LAND)


func _on_exit() -> void:
	player.damageReceiver.set_deferred("monitorable", true)



func on_land_animation_finished():
	if player.inputManager.is_movement_input():
		transition_state(Player.STATE_WALK)
		return
	transition_state(Player.STATE_IDLE)